<%= stylesheet_link_tag "mine/_navbar" %>

<script type="text/javascript" charset="utf-8">
    $(function () {
        var mineNavbar = root.getWidgetById('mine-navbar')

        // 点击即跳转
        mineNavbar.on('keydown', function (e) {
            e =e || window.event;
            var keyValue = e.which || e.keyCode;
            if (keyValue === 13) {
                window.location.href = e.target.con.dataset.href
            }
        });
    });
</script>

<div
  id="mine-navbar"
  class="mine-navbar"
  fe-role="Switch"
  fe-cfg="default_focus:yes,"
>
  <div class="navigation-list">

    <% mine_navbar.each do |item| %>
      <div data-href="<%= item[:path] %>"
           id="<%= item[:id] %>"
           class="navigation-item <%= "fe-cache" if is_matched_route?(item[:path]) %>"
           fe-role="Widget"
           <%= "fe-cfg=default_focus:yes" if is_matched_route?(item[:path]) %>
      >
        <%= item[:name] %>
      </div>
    <% end %>

  </div>
</div>
